#ifndef TCAPI_PICTRANSCODERAPI_H
#define TCAPI_PICTRANSCODERAPI_H
#include "transcoder.h"

namespace tcapi_func_def
{
    typedef void* (*PTranscodeOpen)(PicTransParam *pParam);
    typedef int (*PTranscodeClose)(void* ctx);
    typedef int (*PTranscodePutTask)(void* ctx, TaskParam* task);
    typedef int (*PTranscodeWaitTaskFinish)(void* ctx);
    typedef int (*PTranscodeOptions)(void* ctx, int type, void* pSet, void* pGet);
}

class PicTransCoderApi
{
private:
    PicTransCoderApi();
    ~PicTransCoderApi();
    void *pHandle;
public:
    tcapi_func_def::PTranscodeOpen TranscoderOpen;
    tcapi_func_def::PTranscodeClose TranscoderClose;
    tcapi_func_def::PTranscodePutTask TranscoderPutTask;
    tcapi_func_def::PTranscodeWaitTaskFinish TranscoderWaitTaskFinish;
    tcapi_func_def::PTranscodeOptions TranscoderOptions;
public:
    static PicTransCoderApi* GetInstance();
    int Init();
};

#endif //TCAPI_PICTRANSCODERAPI_H
